Usb type-c cable and method for reading/writing a chip in a usb type-c cable

ABSTRACT

A method for reading/writing a chip in a USB type-C cable comprises converting a read/write command into unstructured vendor defined message (UVDM) that is conforming to a USB power delivery specification. Such UVDM will be delivered to the chip via a type-C configuration channel interface. The chip analyzes the UVDM to acquire the read/write command and reads or modifies the content of a non-volatile memory in the chip according to the read/write command. Due to use of the type-C configuration channel interface, which is inherent in the USB type-C cable, to read/write the chip, it needs no extra interface which otherwise increases costs.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application claims priority benefit of U.S. Provisional PatentApplication No. 62/108,180, entitled “TYPE-C NON-VOLATILE MEMORYWRITER,” filed Jan. 27, 2015, which is hereby incorporated by referencein its entirety.

FIELD OF THE INVENTION

The present invention is related to a USB type-C cable and a method forreading/writing a chip in a USB type-C cable.

BACKGROUND OF THE INVENTION

FIG. 1 shows a conventional method that utilizes a writer 2 to modify anon-volatile memory (NVM) 12 in a chip 4 of a universal serial bus (USB)type-C cable. When the writer 2 is connected to a writer pin 5 of thechip 4, a communication interface 6 will be established between thewriter 2 and chip 4 for reading/writing the non-volatile memory 12 ofthe chip 4. The communication interface 6 can be an inter-integratedcircuit (I²C) interface, a parallel interface, a serial interface, a USBinterface, or a serial bus interface between integrated circuits. In thechip 4, an interface logic circuit 8 sends packets from the writer 2 toa controller 10. The controller 10 analyzes a communication protocolused by the communication interface 6 and reads/writes the non-volatilememory 12 according to the received packets. The non-volatile memory 12can be a multi-time programmable (MTP) memory.

However, after the chip 4 is packed to a conventional USB type-C cable,there is only a type-C interface pin 7 in the chip 4 for an externalconnection to establish a type-C configuration channel (CC). The writerpin 5 is closed after the chip 4 is packed in the USB type-C cable.Accordingly, the writer 2 is unable to modify the non-volatile memory 12via the writer pin 5. Namely, a parameter cannot be trimmed fordebugging the USB type-C cable if there is any error. In other Words, inconventional methods, if the non-volatile memory 12 of the chip 4 is tobe modified, the modification can be only executed before the chip 4 ispacked in the USB type-C cable. If other interfaces, such as the USBinterface, are to be utilized for modifying the non-volatile memory 12the chip 4 that is packed in the USB type-C cable, extra costs areneeded for building a communication protocol of a specific interface inthe chip 4.

Therefore, it is desired a method that needs no extra costs and canmodify the non-volatile memory of the chip in a USB type-C cable via aninherent type-C configuration channel interface.

SUMMARY OF THE INVENTION

An objective of the present invention is to provide a USB type-C cableand a method for reading/writing a chip in a USB type-C cable.

According to the present invention, a method for reading/writing a chipin a USB type-C cable comprises the steps of: converting a read/writecommand into an unstructured vendor defined message (UVDM) that isconforming to a USB power delivery specification, sending the UVDM tothe chip in the USB type-C cable via a type-C configuration channelinterface, and analyzing the UVDM to acquire the read/write command soas to read/write a non-volatile memory in the chip.

According to the present invention, a USB type-C cable comprises a chip.A type-C configuration channel interface will be established between thechip and a writer when the type-C cable is connected to the writer. Thechip includes a non-volatile memory and a controller connected to thenon-volatile memory. After receiving a UVDM that conforms to a USB powerdelivery specification from the writer via the type-C configurationchannel interface, the controller analyzes the UVDM to acquire aread/write command. Then, the controller will read/write thenon-volatile memory according to the read/write command.

The present invention utilizes the type-C configuration channelinterface inherent in the USB type-C cable to send the UVDM so as toread/write the non-volatile memory of the chip in the USB type-C cable.Thus, the chip doesn't need to build extra communication protocol ofspecific interface as well as needs no extra costs.

BRIEF DESCRIPTION OF THE DRAWINGS

These and other objectives, features and advantages of the presentinvention will become apparent to those skilled in the art uponconsideration of the following description of the preferred embodimentsaccording to the present invention taken in conjunction with theaccompanying drawings, in which:

FIG. 1 shows a conventional method that utilizes a writer to modify anon-volatile memory in a chip of a USB type-C cable;

FIG. 2 illustrates a method for reading/writing a chip in a USB type-Ccable;

FIG. 3 shows a controlling procedure for writing a trim register;

FIG. 4 shows a controlling procedure for writing a user page register;and

FIG. 5 shows a controlling procedure for reading a trim register or auser page register.

DETAILED DESCRIPTION OF THE INVENTION

A type-C configuration channel interface of a USB type-C cable candeliver a packet command set that conforms to a USB power delivery (PD).The present invention utilizes an unstructured vendor defined message(UVDM) in the packet command set to command a controller 10 toread/write a non-volatile memory 12. Accordingly, a chip 4 needs noextra communication protocol of specific interface as well as needs noextra costs.

FIG. 2 illustrates a method for reading/writing the chip 4 in the USBtype-C cable 56. When a type-C connector 54 of a writer 2 is connectedto a type-C plug 58 of the type-C cable 56, a type-C configurationchannel interface 60 will be established between the writer 2 and atype-C interface pin 7 of the chip 4 in the USB type-C cable 56. A host50 sends a read/write command to the writer 2 via an I²C interface 52.The read/write command includes a command to write to all sections ofthe non-volatile memory 12, a command to write to an open section of thenon-volatile memory 12, a command to write to a non-open section of thenon-volatile memory 12, or a command to read a data from thenon-volatile memory 12. After the writer 2 converts the receivedread/write command into the UVDM that conforms to the USB PDspecification, the writer 2 will send the UVDM to the chip 4 in the USBtype-C cable 56 via the type-C configuration channel interface 60. Thecontroller 10 of the chip 4 analyzes the received UVDM to acquire thecorrespondent read/write command. Thereafter, the controller 10 writesdata into an address of a specific section of the non-volatile memory 12or reads a data from an address of a specific section of thenon-volatile memory 12 according to the read/write command. If theread/write command is a command for reading the data from the address ofthe specific section, the chip 4 will convert the read data into anotherUVDM that conforms to the USB PD specification and sends the anotherUVDM to the writer 2 via the type-C configuration channel interface 60.

The content of the UVDM can be decided by the vendor according to thepractical needs. The UVDM is widely utilized. The present inventionprovides several common UVDM as examples. Referring to Table 1 to Table8 as follows, every UVDM includes a header, a vendor defined message(VDM) header, and at least one vendor defined data object (VDO). In theUVDM, the content “VDMType=UVDM” in the column VDM HDR is fixed, butother content in the tables can be modified according to the practicalneeds.

TABLE 1 ENTER TEST MODE UVDM HEADER VDM HEADER VDO1 VDO2 OBJ_NUM=TMCODEVID=dedicated VID TESTCODE1 TESTCODE2 VDMType=UVDM CMDType=TMCODE

TABLE 2 WRITE TRIM REGISTER UVDM HEADER VDM HEADER VDO1 VDO2 VDO3 VDO4OBJ_NUM=WTRIM VID=dedicated VID REG33~ REG37~ REG3B~ REG3F~ REG30 REG34REG38 REG3C VDMType=UVDM CMDType=WTRIM

TABLE 3 WRITE USER PAGE1 REGISTER UVDM HEADER VDM HEADER VDO1 VDO2 VDO3VDO4 OBJ_NUM=WUSER1 VID=dedicated VID REG3~ REG7~ REGB~ REGF~ REG0 REG4REG8 REGC VDMType=UVDM CMDType=WUSER1

TABLE 4 WRITE USER PAGE2 REGISTER UVDM HEADER VDM HEADER VDO1 VDO2 VDO3VDO4 OBJ_NUM=WUSER2 VID=dedicated VID REG13~ REG17~ REG1B~ REG1F~ REG10REG14 REG18 REG1C VDMType=UVDM CMDType=WUSER2

TABLE 5 WRITE USER PAGE3 REGISTER UVDM HEADER VDM HEADER VDO1 VDO2 VDO3VDO4 OBJ_NUM=WUSER3 VID=dedicated VID REG23~ REG27~ REG2B~ REG2F~ REG20REG24 REG28 REG2C VDMType=UVDM CMDType=WUSER

TABLE 6 TRIGGER MTP WRITE UVDM HEADER VDM HEADER Command (CMD) VDOOBJ_NUM=WR VID=dedicated VID {RREG_ALL, RMTP_ALL, WMTP_ALL} VDMType=UVDM{WMTP_TRIM, WMTP_USER, RDADDR} CMDType=WRCMD

TABLE 7 MTP READ UVDM HEADER VDM HEADER CMD VDO OBJ_NUM=RD VID=dedicatedVID {RREG_ALL, RMTP_ALL, WMTP_ALL} VDMType=UVDM {WMTP_TRIM, WMTP_USER,RDADDR} CMDType=RDCMD

TABLE 8 EXIT TESTMODE UVDM HEADER VDM HEADER OBJ_NUM=EXITTMVID=dedicated VID VDMType=UVDM CMDType=EXITTM

FIGS. 3 to 5 show some controlling procedures between the writer 2 andthe chip 4 inside the type-C cable.

FIG. 3 shows the controlling procedure for writing a trim register.First, the writer 2 sends an ENTER TEST MODE UVDM 14 to the chip 4inside the type-C cable, so that the chip 4 enters a test mode. Afterthe chip 4 receives the ENTER TEST MODE UVDM 14, a confirmation code(GoodCRC) 16 will be sent back to the writer 2. After the writer 2receives the confirmation code 16, a WRITE TRIM REGISTER UVDM 18 will besent to the chip 4 so as to instruct an address of the non-volatilememory that is to be written. After the chip 4 receives the WRITE TRIMREGISTER UVDM 18, a confirmation code (GoodCRC) 20 will be sent back tothe writer 2. After the writer 2 receives the confirmation code 20, aTRIGGER MTP WRITE UVDM 22 will be sent to the chip 4. After the chip 4receives the TRIGGER MTP WRITE UVDM 22, a confirmation code (GoodCRC) 24will be sent to the writer 2. Then, the chip 4 will start executing awrite operation of the non-volatile memory.

FIG., 4 shows the controlling procedure for writing a user pageregister. First, the writer 2 sends an ENTER TEST MODE UVDM 26 to thechip 4, so that the chip 4 enters a test mode. After the chip 4 receivesthe ENTER TEST MODE UVDM 26, a confirmation code (GoodCRC) 28 will besent back to the writer 2. After the writer 2 receives the confirmationcode 28, a WRITE USER PAGE REGISTER UVDM 30 will be sent to the chip 4so as to instruct the address of the non-volatile memory that is to bewritten. After the chip 4 receives the WRITE USER PAGE REGISTER UVDM 30,a confirmation code (GoodCRC) 32 will be sent back to the writer 2.After the writer 2 receives the confirmation code 32, a TRIGGER MTPWRITE UVDM 34 will be sent to the chip 4. After the chip 4 receives theTRIGGER MTP WRITE UVDM 34, a confirmation code (GoodCRC) 36 will be sentto the writer 2. Then, the chip 4 will start executing a write operationof the non-volatile memory.

FIG. 5 shows the controlling procedure for reading a trim register or auser page register. First, the writer 2 sends an ENTER TEST MODE UVDM 38to the chip 4, so that the chip 4 enters the test mode. After the chip 4receives the ENTER TEST MODE UVDM 38, a confirmation code (GoodCRC) 40will be sent back to the writer 2. After the writer 2 receives theconfirmation code 40, a READ TRIM REGISTER OR USER TRIM UVDM 42 will besent to the chip 4 so as to instruct the address of the non-volatilememory that is to be read. After the chip 4 receives the READ TRIMREGISTER OR USER TRIM UVDM 42, a confirmation code (GoodCRC) 44 will besent back to the writer 2. Then, the chip 4 converts the read data intoa READ REGISTER RETUEN UVDM 46 to the writer 2. After the writer 2receives the READ REGISTER RETURN UVDM 46, a confirmation code (GoodCRC)48 will be sent back to the chip 4.

While the present invention has been described in conjunction withpreferred embodiments thereof, it is evident that many alternatives,modifications and variations will be apparent to those skilled in theart. Accordingly, it is intended to embrace all such alternatives,modifications and variations that fall within the spirit and scopethereof as set forth in the appended claims.

What is claimed is:
 1. A method for reading/writing a chip in a USBtype-C cable, comprising the steps of: A.) converting a read/writecommand into a first unstructured vendor defined message (UVDM) that isconforming to a USB power delivery specification; B.) sending the firstUVDM to the chip in the USB type-C cable via a type-C configurationchannel interface; and C.) analyzing the first UVDM to acquire theread/write command so as to read/write a non-volatile memory in thechip.
 2. The method of claim 1, further comprising the steps of:converting a data read from the non-volatile memory into a second UVDMthat is conforming to the USB power delivery specification; and sendingthe second UVDM to as device connected to the USB type-C cable via thetype-C configuration channel interface.
 3. A USB type-C cable,comprising: a chip configured such that a type-C configuration channelinterface will be established between the chip and a writer when thetype-C cable is connected to the writer, the chip including: anon-volatile memory; and a controller connected to the non-volatilememory and configured to operably analyze a first unstructured vendordefined message (UVDM) that is conforming to a USB power deliveryspecification to acquire a read/write command after receiving the firstUVDM from the writer via the type-C configuration channel interface andread/write the non-volatile memory according to the read/write command.4. The USB type-C cable of claim 3, wherein, when the chip reads data inthe non-volatile memory according to the read/write command, the chipwill converts the read data to a second UVDM that is conforming to theUSB power delivery specification and send the second UVDM via the type-Cconfiguration channel interface.